<template>
  <view class="search-bgc" @click="searchDetail" :style="{ 'background-color': bgcolor }">
    <view class="search" :style="{ 'border-radius': radius + 'px' }">
      <uni-icons type="search" size="20"></uni-icons>
      <text class="search-font">搜索</text>
    </view>
  </view>
</template>
<script>
export default {
  data() {
    return {};
  },
  onLoad() {},
  methods: {
    searchDetail() {
      uni.navigateTo({
        url: '/subpkg/search/search'
      });
    }
  },
  mounted() {},
  props: {
    bgcolor: {
      type: String,
      default: '#C00000'
    },
    radius: {
      type: Number,
      default: 15
    }
  }
};
</script>
<style lang="scss">
.search-bgc {
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  .search {
    height: 30px;
    width: 100%;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    .search-font {
      font-size: 12px;
      margin-left: 5px;
    }
  }
}
</style>
